/**
 * 真实支付路由
 */
const express = require('express');
const router = express.Router();
const realPaymentController = require('../controllers/realPaymentController');
const { authMiddleware } = require('../middleware/auth');

// 创建支付订单 - 需要认证
router.post('/create', authMiddleware, realPaymentController.createPayment);

// 查询支付状态 - 需要认证
router.get('/:paymentId/status', authMiddleware, realPaymentController.queryPaymentStatus);

// 申请退款 - 需要认证
router.post('/:paymentId/refund', authMiddleware, realPaymentController.refundPayment);

// 支付回调 - 不需要认证（第三方回调）
router.post('/callback/:paymentMethod', realPaymentController.handlePaymentCallback);

module.exports = router;
